#计算复利
moeny = 10000
i = 0
while moeny < 20000:
    i += 1
    print(f"第{i}年的本金是：{moeny},利息是：{moeny * 0.05}")
    moeny *= 1.05
print(f"需要{i}年才能到20000")
